package com.example.hrsystem.data.model;

import androidx.room.Entity;
import androidx.room.PrimaryKey;

import java.util.Date;

/**
 * 打卡记录数据模型
 * 用于存储员工的签到签退记录
 */
@Entity(tableName = "attendance_records")
public class AttendanceRecord {

    @PrimaryKey(autoGenerate = true)
    private int id;

    // 员工ID
    private String employeeId;

    // 签到时间
    private Date checkInTime;

    // 签退时间
    private Date checkOutTime;

    // 签到地点
    private String checkInLocation;

    // 签退地点
    private String checkOutLocation;

    // 打卡类型：正常、迟到、早退、异常
    private String attendanceType;

    // 是否完成打卡（签到+签退）
    private boolean isCompleted;

    // 备注信息
    private String remark;

    // 构造方法
    public AttendanceRecord() {
        this.isCompleted = false;
    }

    // Getters and Setters
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getEmployeeId() {
        return employeeId;
    }

    public void setEmployeeId(String employeeId) {
        this.employeeId = employeeId;
    }

    public Date getCheckInTime() {
        return checkInTime;
    }

    public void setCheckInTime(Date checkInTime) {
        this.checkInTime = checkInTime;
    }

    public Date getCheckOutTime() {
        return checkOutTime;
    }

    public void setCheckOutTime(Date checkOutTime) {
        this.checkOutTime = checkOutTime;
    }

    public String getCheckInLocation() {
        return checkInLocation;
    }

    public void setCheckInLocation(String checkInLocation) {
        this.checkInLocation = checkInLocation;
    }

    public String getCheckOutLocation() {
        return checkOutLocation;
    }

    public void setCheckOutLocation(String checkOutLocation) {
        this.checkOutLocation = checkOutLocation;
    }

    public String getAttendanceType() {
        return attendanceType;
    }

    public void setAttendanceType(String attendanceType) {
        this.attendanceType = attendanceType;
    }

    public boolean isCompleted() {
        return isCompleted;
    }

    public void setCompleted(boolean completed) {
        isCompleted = completed;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }
}